<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Cls\V20201016\Models;
use TencentCloud\Common\AbstractModel;

/**
 * ModifyMachineGroup request structure.
 *
 * @method string getGroupId() Obtain Machine group ID
 * @method void setGroupId(string $GroupId) Set Machine group ID
 * @method string getGroupName() Obtain Machine group name
 * @method void setGroupName(string $GroupName) Set Machine group name
 * @method MachineGroupTypeInfo getMachineGroupType() Obtain Machine group type
 * @method void setMachineGroupType(MachineGroupTypeInfo $MachineGroupType) Set Machine group type
 * @method array getTags() Obtain Tag list
 * @method void setTags(array $Tags) Set Tag list
 * @method boolean getAutoUpdate() Obtain Whether to enable automatic update for the machine group
 * @method void setAutoUpdate(boolean $AutoUpdate) Set Whether to enable automatic update for the machine group
 * @method string getUpdateStartTime() Obtain Update start time. We recommend you update LogListener during off-peak hours.
 * @method void setUpdateStartTime(string $UpdateStartTime) Set Update start time. We recommend you update LogListener during off-peak hours.
 * @method string getUpdateEndTime() Obtain Update end time. We recommend you update LogListener during off-peak hours.
 * @method void setUpdateEndTime(string $UpdateEndTime) Set Update end time. We recommend you update LogListener during off-peak hours.
 * @method boolean getServiceLogging() Obtain Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset `cls_service_logging` and the `loglistener_status`, `loglistener_alarm`, and `loglistener_business` log topics will be created, which will not incur fees.
 * @method void setServiceLogging(boolean $ServiceLogging) Set Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset `cls_service_logging` and the `loglistener_status`, `loglistener_alarm`, and `loglistener_business` log topics will be created, which will not incur fees.
 * @method integer getDelayCleanupTime() Obtain Regular offline cleaning time for machines in machine group
 * @method void setDelayCleanupTime(integer $DelayCleanupTime) Set Regular offline cleaning time for machines in machine group
 * @method array getMetaTags() Obtain Metadata information list of a machine group
 * @method void setMetaTags(array $MetaTags) Set Metadata information list of a machine group
 */
class ModifyMachineGroupRequest extends AbstractModel
{
    /**
     * @var string Machine group ID
     */
    public $GroupId;

    /**
     * @var string Machine group name
     */
    public $GroupName;

    /**
     * @var MachineGroupTypeInfo Machine group type
     */
    public $MachineGroupType;

    /**
     * @var array Tag list
     */
    public $Tags;

    /**
     * @var boolean Whether to enable automatic update for the machine group
     */
    public $AutoUpdate;

    /**
     * @var string Update start time. We recommend you update LogListener during off-peak hours.
     */
    public $UpdateStartTime;

    /**
     * @var string Update end time. We recommend you update LogListener during off-peak hours.
     */
    public $UpdateEndTime;

    /**
     * @var boolean Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset `cls_service_logging` and the `loglistener_status`, `loglistener_alarm`, and `loglistener_business` log topics will be created, which will not incur fees.
     */
    public $ServiceLogging;

    /**
     * @var integer Regular offline cleaning time for machines in machine group
     */
    public $DelayCleanupTime;

    /**
     * @var array Metadata information list of a machine group
     */
    public $MetaTags;

    /**
     * @param string $GroupId Machine group ID
     * @param string $GroupName Machine group name
     * @param MachineGroupTypeInfo $MachineGroupType Machine group type
     * @param array $Tags Tag list
     * @param boolean $AutoUpdate Whether to enable automatic update for the machine group
     * @param string $UpdateStartTime Update start time. We recommend you update LogListener during off-peak hours.
     * @param string $UpdateEndTime Update end time. We recommend you update LogListener during off-peak hours.
     * @param boolean $ServiceLogging Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset `cls_service_logging` and the `loglistener_status`, `loglistener_alarm`, and `loglistener_business` log topics will be created, which will not incur fees.
     * @param integer $DelayCleanupTime Regular offline cleaning time for machines in machine group
     * @param array $MetaTags Metadata information list of a machine group
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("GroupId",$param) and $param["GroupId"] !== null) {
            $this->GroupId = $param["GroupId"];
        }

        if (array_key_exists("GroupName",$param) and $param["GroupName"] !== null) {
            $this->GroupName = $param["GroupName"];
        }

        if (array_key_exists("MachineGroupType",$param) and $param["MachineGroupType"] !== null) {
            $this->MachineGroupType = new MachineGroupTypeInfo();
            $this->MachineGroupType->deserialize($param["MachineGroupType"]);
        }

        if (array_key_exists("Tags",$param) and $param["Tags"] !== null) {
            $this->Tags = [];
            foreach ($param["Tags"] as $key => $value){
                $obj = new Tag();
                $obj->deserialize($value);
                array_push($this->Tags, $obj);
            }
        }

        if (array_key_exists("AutoUpdate",$param) and $param["AutoUpdate"] !== null) {
            $this->AutoUpdate = $param["AutoUpdate"];
        }

        if (array_key_exists("UpdateStartTime",$param) and $param["UpdateStartTime"] !== null) {
            $this->UpdateStartTime = $param["UpdateStartTime"];
        }

        if (array_key_exists("UpdateEndTime",$param) and $param["UpdateEndTime"] !== null) {
            $this->UpdateEndTime = $param["UpdateEndTime"];
        }

        if (array_key_exists("ServiceLogging",$param) and $param["ServiceLogging"] !== null) {
            $this->ServiceLogging = $param["ServiceLogging"];
        }

        if (array_key_exists("DelayCleanupTime",$param) and $param["DelayCleanupTime"] !== null) {
            $this->DelayCleanupTime = $param["DelayCleanupTime"];
        }

        if (array_key_exists("MetaTags",$param) and $param["MetaTags"] !== null) {
            $this->MetaTags = [];
            foreach ($param["MetaTags"] as $key => $value){
                $obj = new MetaTagInfo();
                $obj->deserialize($value);
                array_push($this->MetaTags, $obj);
            }
        }
    }
}
